package org.example.seata.bs.order.controller;

import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.example.seata.bs.api.vo.order.OrderPayInfoVo;
import org.example.seata.bs.order.service.OrderPayInfoEnhanceService;
import org.example.seata.common.core.util.ApiResp;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单支付
 *
 * @author hzq
 * @date 2021/11/22 17:29
 */
@RestController
@RequestMapping("/orderPay")
@AllArgsConstructor
public class OrderPayController {

    private final OrderPayInfoEnhanceService orderPayInfoEnhanceService;

    @PostMapping("/{orderId}")
    @ApiOperation("订单支付")
    public ApiResp<OrderPayInfoVo> orderPay(@PathVariable Integer orderId) {
        return orderPayInfoEnhanceService.orderPay(orderId);
    }

}
